#include<iostream>
using namespace std;
class point 
{
private:
	int x, y;
public:
	point(int i = 0, int j = 0) :x(i), y(j) {};
	void display()
	{
		cout << "(" << x << "," << y << ")" << endl;

	}
	point operator +(point& p)
	{
		return point(x + p.x, y + p.y);
	}
	friend point operator -(point&, point&);

};

point operator -(point& q, point& p)
{
	return point(q.x - p.x, q.y - p.y);
}


void main()
{
	point p1(4, 5), p2(3, 9), p3;
	p3 = p1 + p2; p3.display();
	p3 = p1 - p2; p3.display();

}